# Gravity Bilateral Model — Workplan

## Completed

### Phase 1: Data Download & Panel Construction
- [x] CPIS bilateral portfolio data (IMF PIP) — 8.8M rows
- [x] CDIS bilateral FDI data (IMF DIP) — 528K rows
- [x] CEPII GeoDist gravity variables — 50K pairs
- [x] Merge with demographics from followup panel
- [x] Construct bilateral panel — 509K obs, 33,517 pairs

### Phase 2: Gravity Estimation
- [x] Model 2a: Baseline gravity (R²=0.232)
- [x] Model 2b: + Demographics (ΔZ₁=3.68***, ΔZ₂=-0.49***, ΔZ₃=0.019***)
- [x] Model 2c: + KAOPEN interactions (all significant, p<0.023)
- [x] Model 2d: Separate equity/debt/FDI (FDI null — key finding)
- [x] Model 2e: + Price controls (rate_diff_ij NOT sig, but only 506 OECD pairs)

### Phase 3: Robustness
- [x] CCA exclusion (coefficients change <7%)
- [x] Leave-one-region-out jackknife (9/11 stable)
- [x] Extensive margin logit (all ΔZ p<0.001)
- [x] Intensive margin GLS (same as full sample)

### Documentation & Paper
- [x] Draft combined 4.6/5.1 paper (`paper/paper.md`)
- [x] Project documentation (`docs/PROJECT_DOCUMENTATION.md`)

## Open Items

### A. Two-Stage Carvalho Bilateral Rate Controls — COMPLETED (Feb 2026)
**Script**: `scripts/phase2_estimation.py` (Model 2f section)
**S1 coefficients**: Z₁=16.32, Z₂=-2.07, Z₃=0.072 (from `output/tables/rate_channel_tests.csv`, 23 OECD countries)
**Result**: Fitted rate differential is highly significant (coef=-0.161, p<0.001) on full 105K sample. Mediation decomposition: rate channel=58%, direct=42% of bilateral demographic R² improvement. Paper updated with Section 5.3 and Table 2b. Output in `gravity_results.csv` (Model 2f) and `mediation_decomposition.csv`.

### B. Expand Actual Bond Yield Coverage — COMPLETED (Feb 2026)
**Scripts**: `scripts/phase4_expand_yields.py` (download), `scripts/phase4b_reestimate_expanded.py` (estimation)
**Source**: FRED OECD MEI long-term interest rates (IRLTLT01 series)
**Added 12 countries**: POL, CZE, HUN, ISR, CHL, ZAF, ISL, LUX, SVK, SVN, RUS, CHN
**Result**: Coverage doubled (11K→24K obs, 506→1,180 pairs). Rate differential STILL not significant (p=0.102). S1 p-values improved (0.38→0.20) but R² dropped (0.019→0.006). Expanded S1 reverses the fitted rate sign — Carvalho channel is OECD-specific. Reinforces direct-channel finding.
**Output**: `gravity_results_expanded.csv`, `mediation_decomposition_expanded.csv`, `s1_expanded_coefficients.csv`, `expanded_bond_yields.csv`

### C. PPML Estimation — COMPLETED (Feb 2026)
**Script**: `scripts/phase5_ppml.py`
**Goal**: Address potential bias from log-linearization by estimating with PPML (Santos Silva & Tenreyro, 2006).
**Result**: Model 2b PPML confirms all ΔZ signs and significance (magnitudes ~37% of OLS). Model 2c PPML shows demographic effect operates almost entirely through open destinations (base ΔZ reverses but total effect at KAOPEN ceiling is +5.9, larger than OLS). Standard Poisson SEs understated due to overdispersion — significance is qualitative.
**Output**: `ppml_results.csv`
**Paper**: Section 7.6 (Table 5c)

### D. Time-Varying Effects — DROPPED
Dropped as low-value: only 24 years of CPIS data, doesn't address an identification concern, and the pre/post GFC split is unbalanced (7 vs 16 years).

### E. Bilateral Projection Exercise — COMPLETED (Feb 2026)
**Scripts**: `scripts/phase5_projections.py` (demographics only), `scripts/phase5b_projections_ge.py` (enhanced: WEO GDP + GE clearing)
**Method**: Model 2c coefficients × UN WPP 2024 projections × WEO GDP through 2030 × GE rate clearing overlay
**Key findings**:
- GDP growth amplifies all projections (IND +73%, NGA +58%, CHN +38% by 2030)
- GE clearing: Δr* ≈ -1.7pp at 2040-2050 (global aging compresses yields), dampens all bilateral flows ~24%
- GE damping is uniform → net reallocation geography unchanged (demographics determine direction, GE affects volume)
- Korea dominates top bilateral shifts (KOR→ARE: +310% GE-adjusted, KOR→IND: +183%)
- "Second wave" exporters: KOR, CHN, ESP, ITA, THA
- 2030 projections most reliable (actual WEO GDP): KOR→IND nearly doubles (+95%)
**Output**: `bilateral_projections.csv`, `bilateral_projections_ge.csv`, `ge_bilateral_clearing_rates.csv`, `projection_summary_ge.csv`, `projection_decomposition_2050.csv`
**Paper**: Section 8 (Tables 6, 7, 8) — fully rewritten with PE vs GE decomposition

### F. Paper Revisions — COMPLETED (Feb 2026)
- [x] Update Section 5 with Option A results (Section 5.3, Table 2b)
- [x] Update Section 7.4 with Option B results (Table 5b, expanded S1)
- [x] Fix abstract sample sizes, table labels, section references
- [x] Add formal hypothesis tests (Wald tests for joint significance) — `scripts/wald_tests.py`
- [x] Add pair fixed effects discussion (Section 3.1)
- [x] Refine clearing channels integration (Section 6.3 rewritten)
- [x] Add proper references/bibliography (18 entries)

### G. Pre-Submission Strengthening — COMPLETED (Feb 2026)
- [x] Financial center robustness (Section 7.5, Table 5b-ii) — `scripts/phase6_financial_center_robustness.py`
  - Narrow exclusion (11 offshore): coefficients change <6%, all p<0.001
  - Broad exclusion (17 incl. HKG/SGP/CHE/GBR): coefficients *increase* ~20%, all p<0.001
  - KAOPEN interaction weakens under broad (p=0.098) — expected since major open hubs removed
- [x] Multilateral resistance discussion (Section 3.1) — explains why country×year FE would absorb ΔZ
- [x] Standard error discussion (Section 3.1) — AR(1) vs clustered, cross-validated by logit and PPML
- [x] Regenerated paper.docx (12 tables, 190 paragraphs)
